package com.hxkj.cst.chengshuitong.base

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup

/**
 * 作者： Luoyang on 2017/5/25.
 * 描述： 封装一些重复代码
 */
abstract class BaseFragment : Fragment() {
    override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val view = inflater?.inflate(provideContentView(), container, false)
        view?.let { initLayout(it) }
        return view
    }

    open fun provideContentView(): Int = 0

    open fun initLayout(view: View) {}
}